using System;
using System.Collections.Generic;
using System.Text;
using JobShopModel.GraphicInterface;
//TODO Documentation
//TODO Explain the Observable/Observer system
namespace JobShopModel.Model.FactoryLvl
{
    class Observable
    {
        private List<Observer> observerList;

        public void addObserver(Observer obs)
        {
            if (this.observerList == null)
                observerList = new List<Observer>();

            this.observerList.Add(obs);
        }

        protected void stateChanged()
        {
            foreach (Observer o in observerList)
            {
                o.update(this);
            }
        }

    }
}
